package common;

import client.chart.ChartElement;
import client.controlpanel.Configuration;
import client.nyan.NyanElement;
import gui.BlockType;
import gui.GUIManager;
import gui.controlpanel.ControlPanelElement;
import gui.history.DataHistoryElement;
import provider.DataProvider;

public class Runner {

	public static void main(String[] args) throws InterruptedException {
		GUIManager gui = new GUIManager();
		Configuration configuration = Configuration.getInstance();
		DataProvider dataProvider = configuration.getDataProvider();
		
		
		gui.registerElement(new ChartElement(), BlockType.Chart);
		gui.registerElement(new DataHistoryElement(dataProvider.getDataHistory()), BlockType.CurrentMeasurment);
		gui.registerElement(new NyanElement(), BlockType.NyanCat);
		gui.registerElement(new ControlPanelElement(), BlockType.ControlPanel);
		gui.initComponents();
		gui.setVisible(true);

	}

}
